<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
    <link href="../res/dwcms/css/admin.css" rel="stylesheet" type="text/css">
    <link href="../res/dwcms/css/theme.css" rel="stylesheet" type="text/css">

    <link href="../jquery-easyui-1_3_0/themes/icon.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="../jquery-easyui-1_3_0/themes/dark-hive/easyui.css" id="swicth-style">
    <script type="text/javascript" src="../jquery-easyui-1_3_0/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="../jquery-easyui-1_3_0/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function() {
	$("#jvForm").validate();
});
</script>
<style type="text/css">
.items{padding-top:1px;}
</style>
</head>
<body><div style="position: absolute; z-index: 19700; top: -1970px; left: -1970px; display: none;"><iframe style="width: 186px; height: 199px;" src="vote_save_files/My97DatePicker.html" border="0" frameborder="0" scrolling="no"></iframe></div>
<div class="body-box">
<div class="rhead">
	<div class="rpos">当前位置: 投票管理 - 添加</div>
	<form class="ropt">
		<input value="返回列表" onclick="this.form.action='v_list.do';" type="submit">
	</form>
	<div class="clear"></div>
</div>
<form method="post" action="o_save.do" id="jvForm">
<table class="pn-ftable" border="0" cellpadding="2" cellspacing="1" width="100%">
<tbody><tr>
<td class="pn-flabel pn-flabel-h" width="20%"><span class="pn-frequired">*</span>标题:</td><td class="pn-fcontent" width="80%"><input maxlength="255" name="title" class="required" style="width: 400px;" type="text"></td></tr><tr><td class="pn-flabel pn-flabel-h" width="20%">描述:</td><td class="pn-fcontent" width="80%"><textarea rows="3" name="description" style="width: 400px;" maxlength="255"></textarea>
</td></tr><tr><td class="pn-flabel pn-flabel-h" width="20%">投票时间限制:</td><td class="pn-fcontent" width="80%">
<table>
	<tbody><tr>
		<td>开始时间</td>
		<td><input name="startTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" type="text"></td>
		<td rowspan="2" valign="middle"><span class="pn-fhelp">留空不限制</span></td>
	</tr>
	<tr>
		<td>结束时间</td>
		<td><input name="endTime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="Wdate" type="text"></td>
	</tr><tr>
</tr></tbody></table>
</td></tr>
<tr><td class="pn-flabel pn-flabel-h" width="20%">重复投票时间:</td><td class="pn-fcontent" width="80%"><input maxlength="10" name="repeateHour" class="digits" type="text"> <span class="pn-fhelp">单位：小时。为空禁止重复投票；0为不限制重复投票。</span></td></tr><tr><td class="pn-flabel pn-flabel-h" width="20%">限制用户:</td><td class="pn-fcontent" width="80%"><label><input value="true" name="restrictMember" type="radio">是</label> <label><input value="false" checked="checked" name="restrictMember" type="radio">否</label> <span class="pn-fhelp">（是：必须登录才能投票；否：允许游客投票）</span></td></tr><tr>
<td class="pn-flabel pn-flabel-h" width="20%">限制IP:</td><td class="pn-fcontent" width="80%"><label><input value="true" name="restrictIp" type="radio">是</label> <label><input value="false" checked="checked" name="restrictIp" type="radio">否</label></td></tr><tr>
<td class="pn-flabel pn-flabel-h" width="20%">限制COOKIE:</td><td class="pn-fcontent" width="80%"><label><input value="true" checked="checked" name="restrictCookie" type="radio">是</label> <label><input value="false" name="restrictCookie" type="radio">否</label> <span class="pn-fhelp">（可以识别同一IP的不同电脑）</span></td></tr><tr>
<td class="pn-flabel pn-flabel-h" width="20%"><span class="pn-frequired">*</span>最多能选几项:</td><td class="pn-fcontent" width="80%">
<input name="multiSelect" value="1" class="required digits" style="width: 100px;" type="text">
<label style="padding-left:20px"><input onclick="$('#def').val(this.checked);" type="checkbox">默认<input id="def" name="def" value="false" type="hidden"></label>
<label style="padding-left:10px"><input onclick="$('#disabled').val(this.checked);" type="checkbox">暂停<input id="disabled" name="disabled" value="false" type="hidden"></label>
</td></tr>
<tr><td colspan="2" class="pn-fbutton">
<div class="items">
投票项&nbsp; <input value="新增几行" onclick="addLines();" type="button">
</div>
<div id="itemsContainer">
<div class="items">
标题: <input name="itemTitle" style="width: 300px;" type="text">
&nbsp; 票数: <input name="itemVoteCount" value="0" style="width: 50px;" type="text">
&nbsp; 排序: <input name="itemPriority" value="1" style="width: 30px;" type="text">
&nbsp; <input value="删除" onclick="$(this).parent().remove();" type="button">
</div>
<div class="items">
标题: <input name="itemTitle" style="width: 300px;" type="text">
&nbsp; 票数: <input name="itemVoteCount" value="0" style="width: 50px;" type="text">
&nbsp; 排序: <input name="itemPriority" value="2" style="width: 30px;" type="text">
&nbsp; <input value="删除" onclick="$(this).parent().remove();" type="button">
</div>
<div class="items">
标题: <input name="itemTitle" style="width: 300px;" type="text">
&nbsp; 票数: <input name="itemVoteCount" value="0" style="width: 50px;" type="text">
&nbsp; 排序: <input name="itemPriority" value="3" style="width: 30px;" type="text">
&nbsp; <input value="删除" onclick="$(this).parent().remove();" type="button">
</div>
<div class="items">
标题: <input name="itemTitle" style="width: 300px;" type="text">
&nbsp; 票数: <input name="itemVoteCount" value="0" style="width: 50px;" type="text">
&nbsp; 排序: <input name="itemPriority" value="4" style="width: 30px;" type="text">
&nbsp; <input value="删除" onclick="$(this).parent().remove();" type="button">
</div>
<div class="items">
标题: <input name="itemTitle" style="width: 300px;" type="text">
&nbsp; 票数: <input name="itemVoteCount" value="0" style="width: 50px;" type="text">
&nbsp; 排序: <input name="itemPriority" value="5" style="width: 30px;" type="text">
&nbsp; <input value="删除" onclick="$(this).parent().remove();" type="button">
</div>
</div>
</td></tr>
<tr><td colspan="2" class="pn-fbutton">
<input value="提交" type="submit"> &nbsp; <input value="重置" type="reset"></td>
</tr></tbody></table>
</form>
</div>

<textarea id="itemTpl" style="display: none;">&lt;div class="items"&gt;
标题: &lt;input type="text" name="itemTitle" style="width:300px"/&gt;
&nbsp; 票数: &lt;input type="text" name="itemVoteCount" value="0" style="width:50px"/&gt;
&nbsp; 排序: &lt;input type="text" name="itemPriority" value="{0}" style="width:30px"/&gt;
&nbsp; &lt;input type="button" value="删除" onclick="$(this).parent().remove();"/&gt;
&lt;/div&gt;
</textarea>

<script type="text/javascript">
var tpl = $.format($("#itemTpl").val());
var index = 6;
function addLines() {
	$("#itemsContainer").append(tpl(index++));
}
</script>


</body></html>